package com.ikun.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.ikun.entity.MaintenanceOrders;
import com.ikun.entity.req.MaintenanceOrderDTO;

@Mapper
public interface MaintenanceOrdersDao {
    List<MaintenanceOrders> findAssignedOrders();

    List<MaintenanceOrders> findCompleted();

    int addMaintenanceOrders(MaintenanceOrders maintenanceOrders);

    int markOrderAsCompleted(@Param("params") String params, @Param("staffId") String staffId);

    List<MaintenanceOrderDTO> getPendingOrders(@Param("staffId") Integer staffId);

    List<MaintenanceOrderDTO> findAllWorkOrdersByMangerId(@Param("mangerId") Integer mangerId);

    int assignStaff(@Param("orderId") String orderId, @Param("staffId") Integer staffId);

    List<MaintenanceOrderDTO> findAllWorkOrders();
}
